/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.edu.com1263.model;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author Luiz Cardoso
 */
@Entity
@Table(name="paradigma")
public class Paradigma implements Serializable{
	private static final long serialVersionUID = 1145044791793649333L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="id_paradigma")
	private Long id;
	
    @Column(name="cod_paradigma")
	private String codParadigma;
    
    @Column(name="nome_paradigma")
	private String nomeParadigma;
	
    @Column(name="descricao_paradigma")
	private String descricaoParadigma;

    @ManyToMany(mappedBy = "paradigmas")
	private Collection<Tarefa> tarefas;
    
    @ManyToOne
	@JoinColumn(name = "id_prof")
    private Professor professor;
	
    
    
	public Paradigma() {
		tarefas = new HashSet<Tarefa>();

	}


	public Paradigma(String codParadigma, String nomeParadigma,
			String descricaoParadigma) {
	
		this.codParadigma = codParadigma;
		this.nomeParadigma = nomeParadigma;
		this.descricaoParadigma = descricaoParadigma;
	}




	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCodParadigma() {
		return codParadigma;
	}

	public void setCodParadigma(String codParadigma) {
		this.codParadigma = codParadigma;
	}

	public String getDescricao() {
		return descricaoParadigma;
	}

	public void setDescricao(String descricao) {
		this.descricaoParadigma = descricao;
	}



	public Collection<Tarefa> getTarefas() {
		return tarefas;
	}



	public void setTarefas(Collection<Tarefa> tarefas) {
		this.tarefas = tarefas;
	}


	public void setNomeParadigma(String nomeParadigma) {
		this.nomeParadigma = nomeParadigma;
	}


	public String getNomeParadigma() {
		return nomeParadigma;
	}


	public void setProfessor(Professor professor) {
		this.professor = professor;
	}

	public Professor getProfessor() {
		return professor;
	}


	public String getDescricaoParadigma() {
		return descricaoParadigma;
	}


	public void setDescricaoParadigma(String descricaoParadigma) {
		this.descricaoParadigma = descricaoParadigma;
	}


}
